<?php

namespace App\Model\Product;

use App\Model\Model;
use Hyperf\Database\Model\SoftDeletes;

/**
 * @property integer $id
 * @property integer $uid
 * @property integer $oid
 * @property string $unique
 * @property integer $product_id
 * @property string $reply_type
 * @property boolean $product_score
 * @property boolean $service_score
 * @property string $comment
 * @property text $pics
 * @property integer $add_time
 * @property string $merchant_reply_content
 * @property integer $merchant_reply_time
 * @property boolean $is_del
 * @property boolean $is_reply
 * @property string $nickname
 * @property string $avatar
 */
class StoreProductReply extends Model
{
    use SoftDeletes;

    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'store_product_reply';

    protected $fillable = [
        'uid',
        'oid',
        'unique',
        'product_id',
        'reply_type',
        'product_score',
        'service_score',
        'comment',
        'pics',
        'add_time',
        'merchant_reply_content',
        'merchant_reply_time',
        'is_del',
        'is_reply',
        'nickname',
        'avatar',
    ];

    public function Product()
    {
        return $this->hasOne(StoreProduct::class, 'id', 'product_id');
    }
}
